#ifndef APPOINTMENTPAGE_H
#define APPOINTMENTPAGE_H

#include <QWidget>
#include <QComboBox>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QRegularExpressionValidator>
#include <QMessageBox>
#include "../Tools/clienttcp.h" // 假设 ClientTcp 类已经定义
#include <QDebug>
#include <QVBoxLayout>
#include <QJsonObject>
#include "../Entities/User.h"

class AppointmentPage : public QWidget {
    Q_OBJECT

public:
    explicit AppointmentPage(int currentID, QString role, QWidget *parent = nullptr);

private slots:
    void updateDoctorComboBox();
    void submitAppointment();

private:
    int currentID;
    QString role;
    QComboBox *departmentComboBox;
    QComboBox *doctorComboBox;
    QLineEdit *patientNameEdit;
    QLineEdit *patientPhoneEdit;
    ClientTcp *tcp_dep;
    ClientTcp *tcp_doc;
    ClientTcp *tcp_app;
    QList<QJsonObject> depData;
};

#endif // APPOINTMENTPAGE_H
